<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>意见反馈</title>
    <link href="css/bootstrap.css" rel="stylesheet" type="text/css">
    <link href="css/mystyle.css" rel="stylesheet" type="text/css">
    <script src="js/jquery-3.2.1.min.js"></script>
    <script src="js/bootstrap.min.js"> </script>
</head>
<body>
<!-- 顶部banner -->
<div class="container">
    <div class="banner">
        <ul class="nav nav-pills topmenu">
            <li role="presentation"><a href="${pageContext.request.contextPath}/productServlet">主页</a></li>
            <li role="presentation"><a href="CommodityRegistered.jsp">用户注册</a></li>
            <li role="presentation"><a href="CommodityForgetPassword.jsp">忘记密码</a></li>
            <li role="presentation"><a href="${pageContext.request.contextPath}/feedbackServlet?demand=showAll">意见反馈</a></li>
        </ul>
    </div>
</div>

<%--留言发表--%>
<div class="container" style="margin-top: 30px">
<form class="form-horizontal" method="post">
    <div class="form-group">
        <div class="col-sm-10">
            <input name="new_message" class="form-control" id="new_message" placeholder="留言内容">
        </div>
        <div class="col-sm-2">
            <input formaction="${pageContext.request.contextPath}/feedbackServlet?demand=comments&customer=${sessionScope.loginCustomer.name}" class="btn btn-info btn btn-primary" type="submit" value="发表留言">
        </div>
    </div>


</form>
</div>

<!--意见反馈-->
<div class="container" style="margin-top: 50px">
    <table align="center" class="table table-bordered table-striped">
        <tbody>
        <c:forEach items="${sessionScope.ideaAllList}" var="feedback">
            <tr>
                <td rowspan="4"><img src="images/face/${feedback.c_header}" width="70%" alt=""/></td>
                <td class="pull-right">[留言者]${feedback.c_name}&nbsp;&nbsp;&nbsp;&nbsp;[留言时间]${feedback.new_time}</td>
            </tr>
            <tr>
                <td>[留言]${feedback.new_message}</td>
            </tr>
            <tr>
                <td class="pull-right">[回复者]${feedback.re_name}&nbsp;&nbsp;&nbsp;&nbsp;[回复时间]${feedback.re_time}</td>
            </tr>
            <tr>
                <td>
                    <div class="col-sm-8">
                        <form class="form-horizontal" method="post">
                            <div class="form-group">
                                <div class="col-sm-6">
                                    <input name="re_message" class="form-control" id="re_message" value="${feedback.re_message}" placeholder="留言内容">
                                </div>
                                <div class="col-sm-2">
                                    <input formaction="${pageContext.request.contextPath}/feedbackServlet?demand=reply&customer=${sessionScope.loginCustomer.name}&feedbackId=${feedback.id}" class="btn btn-info btn btn-primary" type="submit" value="回复留言">
                                </div>
                            </div>
                        </form>
                    </div>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>

<div class="footerbg center showMove">
    <p> Designed and built with all the love in the world by @mdo and @fat. Maintained by the core team with the help of our contributors.</p>
</div>

</body>
</html>
